@extends('home.layout.user')
@section('content')
   <div class="uc-rgt user_recommend_list">
   <div class="uc-top-bar">
    <div class="sort-nav" id="qqq">
     <a href="javascript:;" class="sort-nav-tab user_nav_child" data="0">待解答</a>
     <span class="sort-nav-bar"></span>
     <a href="javascript:;" class="sort-nav-tab user_nav_child" data="1">未采纳</a>
     <span class="sort-nav-bar"></span>
     <a href="javascript:;" class="sort-nav-tab user_nav_child" data="2">已采纳</a>

     <script src="/js/jquery-1.8.3.min.js"></script>
     <script>
            $(function(){
                $('#qqq a').click(function(){
                  // 设置元素背景
                  $(this).addClass('cur');
                  // 获取自定义属性
                  var x =$(this).attr('data');
                  // // 设置所有的div默认隐藏
                  $('.userstyle').css('display','none');
                  // // 让指定的div显示
                  $('.userstyle:eq('+x+')').css('display','block');
                }).mouseout(function(){
                  $(this).removeClass('cur');
                })
              })
          </script>
    </div>
   </div>
   <div id="reco_list">
    <div id="userList_recommend" class="uc-lst reco_list">
     <div class="userstyle" style="display:block;">
      <div>
        @foreach($question as $k=>$v)
       <ul>
        <li class="list_item">
         <div class="user-thumb-box">
          <a href="/user/center?uid=36025317" target="_blank" class="user-thumb getUserCard" data-uid="36025317"> <img src="{{$login_user['photo']}}" alt="头像" height="38" width="38" /></a>
         </div>
         <div class="uc-lst-info">
          <div class="uc-tit-box">
           <a href="/home/answer/{{$v['id']}}" target="_blank" class="uc-lst-tit">{{$v['q_title']}}</a>
          </div>
          <div class="uc-lst-bar">
           <div class="uc-lst-txt">
            {{$v['q_time']}}
           </div>
          </div>
          <div class="uc-tag-box">
           <div class="uc-lst-tag6">
            <i> </i>
            <div class="uc-lst-tag-tit">
             {{$v['count']}}个回答
            </div>
           </div>
          </div>
         </div>
         </li>
       </ul>
       @endforeach
      </div>
      <div class="page-num">
       <!--  {!! $question->render()!!} -->
      </div>
      <!-- 向我推荐 -->
      <div id="userList_recommend" class="uc-lst reco_list">
       <div class="userstyle">
         <div class="category-none">
          <div>
           暂时还没有人向您求助，去其他页面帮助他人解答疑惑吧~
          </div>
         </div>
        </div>
     </div>
     <!-- //向我推荐 -->
     <!-- //向我推荐 -->
    </div>
   </div>
  </div>
@endsection